Web Application « Development « JPA Q&A





1. How to move the environment details outside the EAR    stackoverflow.com

Our project is a medium size web application developed using RAD 7.0 on WAS 6.1/hibernate/struts which moved to production. Currently we have hardcoded the ip address of the production system in ...

2. From Computer Scientist to Software Engineer    stackoverflow.com

I graduated in December in Computer Science and have acquired a Software Engineering position. I have been banging my head up against the wall for 2 months trying to learn Hibernate, ...

3. Reporting for multi-tenant web app    stackoverflow.com

We have a multi-tenant web-based Enterprise application using Hibernate over MySQL. We use Jasper Reports for any reports that our customers require, but now we also need to offer ad-hoc reporting ...

4. Object equality in context of hibernate / webapp    stackoverflow.com

How do you handle object equality for java objects managed by hibernate? In the 'hibernate in action' book they say that one should favor business keys over surrogate keys.
Most of the ...

5. JPA Web application management strategies    stackoverflow.com

We're currently developing a J2EE web app using JPA as our data access layer. We're currently entertaining a couple different strategies to utilizing caching within our applications.

  1. Create an EntityManager per request
    • Get ...

6. Manipulating JPA enities direclty in the web layer without DTOs    stackoverflow.com

I work on an web application that uses JPA/EclipseLink together with Spring and Tapestry. As of now, my web layer retrieves and displays the JPA entities directly without using any DTOs. Is this ...

7. Hibernate and small web apps    coderanch.com

In terms of complecity ... yes about the same as JDBC. In terms of time in development - based on my initial impression I would say that projects with 10 tables or less and only a couple of queries a table you are going to write much less code via JDBC. I think ORM shines with larger projects.

8. using Hibernate in a web application    coderanch.com

Hi all! I'm starting my first project using Hibernate. I have to use it in a Web application that uses Struts as Framework. I'd like to have some advice about how to pass DB Data to JSP for displaying rows. In other words, should I pass the "live" Hibernate Object (that maps the DB column) directly to the JSP. (With the ...

9. where to put hibernate configuration xml files in a web application    coderanch.com

Suppose I want to develope a web srevlet/jsp application and its backend uses hibernate DAO. I have the following hibernate cxml files and I don't know where to deploy them to. hibernate.cfg.xml (hibernate configuration file), db.hbm.xml (datbase mapping file) I have this deployment directory structure WEB-INF/ classes/ myapp/dao myapp/action myapp/servlet/ .... lib/ Shall I put them in WEB-INF/ directory ?





10. Problem running web app using hibernate    coderanch.com

I am new to hibernate and am using hibernate for the first time . I want to build a small web app in which the data base interaction is carried out through hibernate mapping I have tried to build it using the reference provided from the following site http://jpa.ezhibernate.com/Javacode/learn.jsp?tutorial=01howtogetstartedwithhibernate Please let me know what else needs to be done here is ...

11. Folder Structure for a Hibernate Web Application    coderanch.com

XML configuration file of Hibernate, hibernate.cfg.xml should always be placed at the root of the classpath, outside of any package. If you misplaced this configuration file into a other directory, you may get a error like this : "Initial SessionFactory creation failed " .. If you prefer Hibernate to locate for your hibernate.cfg.xml file in a sub-package of your classpath, you ...

12. Hibernate works with standalone app but problems with WebApp    forum.hibernate.org

Dear All, Sorry I am new to Hibernate . I have just finished my practice using a Standalone App.When I started with Web-Application with the same environment (Hibernate.cfg.xml and Object.hbm.xml), I am getting the following exception while starting a new Session:- Code: Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource uk/co/planetbeyond/Object.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:616) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1635) ...

13. Hibernate with web application problem    forum.hibernate.org

Newbie Joined: Thu May 13, 2010 8:31 am Posts: 2 Hi i try to make sample web application using JSP and servlet which take input and insert in into DB using hibernate , but i face this Problem Can any one help mee, how to solve this problem Code: type Exception report message description The server encountered an internal error () ...

14. Web app and standalone app configured from the same files    forum.hibernate.org

I have an existing web service built with Java 6, Tomcat 6, and Hibernate 3.2 that uses hibernate.cfg.xml for object mappings only, and webservice.beans.xml (used by wed.xml) for the datasource and other properties. I'd like to reuse these files, if possible, for the configuration of the batch/cron files that will work on the same data. One key feature is that there ...

15. i am getting this error while creating a simple web app..    forum.hibernate.org

57:16,213 ERROR [org.apache.struts.action.RequestProcessor]No action instance for path /firstPage could be created: java.lang.ClassNotFoundException: bio.actions.firstPageAction at java.net.URLClassLoader$1.run(URLClassLoader.java:202) [:1.6.0_21] at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_21] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [:1.6.0_21] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [:1.6.0_21] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_21] at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117) [:1.2.9] at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143) [:1.2.9] at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292) [:1.2.9] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230) [:1.2.9] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [:1.2.9] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [:1.2.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) ...

16. Web application hanging    forum.hibernate.org

Hi All, Our application just hangs and does not allow some transactions. This is happening often. Application goes back to normal after we clear the cache. Has any one faced this issue? Does it occur because of Nhibernate? How can we analyze this issue? Any help appreciated. We are using Nhibernate with .net 2.0.5 and Oracle 10g Some details: When this ...





17. Externalise persistance.xml file for web apps    forum.hibernate.org

Hi, this question has been asked many times, and it doesn't appear to be possible - are there any plans to change this in any future releases? Using EJB DI it would be very much more flexible to have the database connection parameters be editable via some external config file. On single deployments it is not a problem, but hosting multiple ...

18. Hibernate application + Java Web Start    forum.hibernate.org

Hi, I have recently created a Hibernate application, which is working fine in my Eclipse IDE environment. However, when i tried to run it through Java Web Start, I get "NoClassDefFoundError". I have tried all possible combinations of cglib-asm.jar,cglib.jar and the cglib-full-......jar. A similar problem was answered in the FAQ section, but the solution of having the latest cglib.jar does'nt work. ...

19. In two web application,the data can't be shared?    forum.hibernate.org

20. Hibernate in web applications    forum.hibernate.org

Hi, I have large Hibernate application (about 40 Hibernate mapping classes). I use ThreadLocal pattern. For every http request I open session in my SessionThreadLocal and when page is completly done I closed session (in Filter). But this is not all right, because new Hibernate Session object need more than 1 second for first .load(). What is proper patter for web ...

21. http 500 error in web application    forum.hibernate.org

Hello- I get an error while starting a web application that hibernate. hibernate.cfg is stored in WEB-INF/classes folder. Contents of hibernate.cfg.xml is mentioned below. The exception on the browser is given below. Hibernate version is 2.1.2 Please provide pointers to solve this error. regards, Amitabh. ----------------------- hibernate.cfg.xml contents -----------------------

22. Question on where to put config files in webapp    forum.hibernate.org

23. Hibernate lazy initialisation in a WebWork web application    forum.hibernate.org

Author Message MusuL Post subject: Hibernate lazy initialisation in a WebWork web application Posted: Sun Jun 13, 2004 2:10 am Newbie Joined: Wed Feb 11, 2004 12:03 pm Posts: 15 Hi, I'm currently having troubles while trying to lazy initialise a set from a bean when I try to read this set from mys jsp page with webwork tags. ...

24. Lazy initialistation + Web application    forum.hibernate.org

Author Message MusuL Post subject: Lazy initialistation + Web application Posted: Sun Jun 13, 2004 9:29 am Newbie Joined: Wed Feb 11, 2004 12:03 pm Posts: 15 Does someone know how to make sure the hibernate session will not last before my web page lazy initialize a set of object please ? Actually I use a filter with a ...

25. first shot at hibernate in a webapp    forum.hibernate.org

So here is the skinny. I am about to give hibernate a shot for the first time. It is going to be used with struts in a web app which will be deployed to Websphere 5.1. Ive seen a method described on this forum for using an EJB module to contain the hibernate stuff, but I dont really want to go ...

26. Hibernate webapp not garbage collected after it is stopped    forum.hibernate.org

When using the tomcat manager app to stop a web app, tomcat discards the classloader for the web app context so that the memory used by the web app can get garbage collected. When the web app uses Hibernate, however, the classloader does not get garbage collected. This means that all classes that it loaded and any static references that these ...

27. multiple webapps depend on same Hibernated business objects    forum.hibernate.org

I have a group of different webapps that are running in the same instance of JBoss and Tomcat. They all use the same business objects and look at the same database. I'm wondering what tried and true practices there are for deploying a .jar file of Hibernated business objects in such a way that many webapps deployed within the same Tomcat ...

28. Example of web application    forum.hibernate.org

Hi, i'm writing a web application using Struts and Hibernate. Are there any example of web application (and that I cat download!!) built with this tool on the web? Explicitly I found some diffulty with: [1] Using a lazy class/collection across pages/action (Long session). [2] Write a right filter for long session. [3] What do the filter intercept? *, , *.jsp, ...

29. Best Practices for multiple Web Applications and Hibernate    forum.hibernate.org

Given multiple web applications in tomcat, how can we 1) Use One Session Factory? 2) avoid use of /common/lib/ common loader? 3) define hibernate.properties for each webapp? 4) if /common/lib/ needed to be the location for hibernate.jar, then how can webapps utilize hibernate.properties as when hibernate is loaded by the common loader the hibernate.properties in the webapps are ignored.

30. Which is good approach for a web based application    forum.hibernate.org

Assuming your EJB (session bean) is referring to a remote session facade, with this approach you will have to deal with serializing objects you wish to return to the client (servlet). We are looking at this approach for a project I'm working on, and this is a major concern for me, as eagerly loading some of our objects would be a ...

31. Hibernate && Web Application    forum.hibernate.org

Well... i need to ask you something!!. I'm not having a bug... nor an exception. I need to know the following: i'm developing a web application with WebWork & Hibernate (3.0.2) for an university project. Suppose you have Cat objects, with ID and Name. When your user wants to modify a Cat, well, you search the cat by its ID and ...

32. thick client (NON-webapp) best practices?    forum.hibernate.org

Hi, we are developing a stand-alone thick client application with Hibernate that talks directly to the database. It's Model View Controller, and the model objects are of course persistent through Hibernate. All objects are displayed for a long time on the user's screen, and the user may navigate around in them as needed. So you get all those issues with lazy ...

33. Holiday webapp goes awry due to NoClassDefFoundError    forum.hibernate.org

I've been working on a webapp for my Dad's dental office. It is my Christmas gift to him this year. I made significant progress on the project this past weekend but then I hit a wall last night when JBoss started throwing a NoClassDefFoundError. My platform is Debian Linux using JDK 1.5.0_04. My environment is JBoss 4.0.2 + included Hibernate + ...

34. web application    forum.hibernate.org

35. 2 User on a web application scenario...    forum.hibernate.org

Hi, This is more of an advice question more than a problem. Here is my scenario: - A web application with 2 users logged in... - Both users have accessed the same object from the database after logging in at around the same time. - User A decides to change the "status" parameter of the object. - So now User B ...

36. HIbernate usage across webapps    forum.hibernate.org

Perhaps I should rephrase my question. Is it a better idea to have multiple webapps leverage the same SessionFactory (and hence, all webapps' will share the same Hibernate configuration file and will have to combine all of their mappings into a central location / archive), or to have each webapp instantiate their own SessionFactory. The question is basically one of deployment ...

37. Hibernate on a WebApp    forum.hibernate.org

38. Problem Involving Web Apps    forum.hibernate.org

I have lately been trying to use Hibernate to develop a web application for Tomcat, which I have successfully written and tested using Eclipse's web tools. When I publish the web application with Eclipse, it works fine. But when I put the .war file in Tomcat's web-apps directory and start it normally, it gives me the following error: INFO: Deploying web ...

39. Hibernate Web Application    forum.hibernate.org

Hi, I am a newbie to Hibernate & J2EE Am trying to use hibernate with struts2. while saving an object to db am getting "No suitable driver".Am getting this error only when running it as a web application.When i run the same Hibernate code using same hibernate mapping file as a standalone it's working fine. I placed the db2java.zip file in ...

40. NonUniqueObjectException and how to get around it in webapps    forum.hibernate.org

Consider the following, common scenario in a webapp: A multi-HTTP-request wizard, following the OpenSessionPerHttpRequest pattern: 1) open Hibernate session 2) get() some (persistant) objects 3) modify them with user data 4) put these (temporary) objects into the HTTP session 5) repeat steps 3-4 as needed 6) user is finished mofiying data, try to save: NonUniqueObjectException! I know *why* this Exception is ...

41. USING HIBERNATE OTHER THAN WEB APPS    forum.hibernate.org

42. Good Hibernate Usage for a fairly simple web application    forum.hibernate.org

Hibernate version: Hibernate 3 Name and version of the database you are using: MYSQL 5.0.67 Hello, I searched around the net and had trouble answering my questions so I though I would start a thread. Basically I read the hibernate.org/42 thread and found it very interesting and got me wondering about how I would like to use hibernate in my application. ...

43. WebApp Freezes    forum.hibernate.org

Newbie Joined: Tue Dec 18, 2007 7:42 am Posts: 19 I have some really annoying freezes on my production website. Hope someone can help :) Server specs: -OS: Linux CentOS -Webserver: Tomcat 6 -MySQL 5 with default settings -Frameworks: Wicket 1.4-rc2 (webframework), Spring 2.5.6, Hibernate 3.3.1.GA, C3P0 db pooling 0.9.1.2, URLRewriteFilter 3.1.0, Spring OpenSessionInViewFilter Problem: At some point (about 5 to ...

44. Stale data intermittently returned within web application    forum.hibernate.org

Hi Folks, I know this has come up a few times before - I've looked at some of the other threads on this issue but nothing has seemed to help much. I'm developing an "online shop" web application and I've run into a curious issue in which I occasionally get an out-of-date version of model data from Hibernate. I'm using the ...

45. Migrating existing web app to wicket and hibernate    forum.hibernate.org

Hello hibernate bunch, I have the dubious task of migrating a large web app with a complicated business model (bio-high-tech/animal science). I have a working framework with Wicket and hibernate and I am able to return all the records from a couple of tables (as expected). I am using appropriately created Object Class files (Java) using the @-sign annotations. I am ...